import request from './request'
// 牧场新增
export const earTagAdd = (addEarTag) => {
  return request({
    url: '/earTag/add',
    method: 'post',
    data: addEarTag,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 牧场列表
export const earTagList = (params) => {
  return request({
    url: '/earTag/list',
    method: 'get',
    param: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

//  牧场详情
export const earTagDtail = (earTagId) => {
  return request({
    url: '/earTag/detail',
    method: 'get',
    param: {
      earTagId
    },
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 修改牧场
export const earTagUpdate = (updateEarTag) => {
  return request({
    url: '/earTag/update',
    method: 'post',
    data: updateEarTag,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 所有耳标列表
export const earTagAllList = () => {
  return request({
    url: '/earTag/allList',
    method: 'get',
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}
